﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ivy.UserRegistration.Entity;

namespace Ivy.UserRegistration.IBusinessLogic
{
    public interface IUserRegistrationBus
    {
        #region UserRegistration and profile update
        bool RegisterNewUser(User UserEntity);
        bool SendVerificationCodeEmail(User UserEntity);
        bool UpdateRegisteredUser(User UserEntity);
        bool SaveUserProfile(UserProfile UserProfileEntity);
        bool IsLoginIDExisting(string UserLoginID);
        bool IsUserVerified(string UserLoginID);
        User GetUserByLoginID(string UserLoginID);
        bool Login(string UserLoginID, string Password); 
        UserProfile GetUserProfileByID(string UserID);
        #endregion UserRegistration and profile update

        #region User Society and Role management
        /// <summary>
        /// 
        /// </summary>
        /// <param name="UserKey"></param>
        /// <param name="SocietyKey"></param>
        /// <param name="RoleKey"></param>
        /// <returns></returns>
        bool AssignSocietyAndRoleToUser(int UserKey, int SocietyKey, int RoleKey);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="UserKey"></param>
        /// <param name="SocietyKey"></param>
        /// <param name="RoleKey"></param>
        /// <returns></returns>
        bool RemoveSocietyAndRoleFromUser(int UserKey, int SocietyKey, int RoleKey);

        

        /// <summary>
        /// This method will be used to retreive the list of Roles associated with the selected user.
        /// GetAllRolesForSelectedUser(UserKey);
        /// </summary>
        /// <param name="UserKey"></param>
        /// <returns></returns>
        List<UserRole> GetAllRolesForSelectedUser(int UserKey);


        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Rolekey"></param>
        /// <returns></returns>
        Sys_RoleMaster GetSelectedSys_RoleMasterByID(int Rolekey);
        #endregion User Society and Role management


    }
}
